class Person {
    name;
    eat(){
        console.log(name);
        
    }
}

var p1 = new Person();
p1.name = 'Alan';
p1.eat();